Common files of the /etc directory and their uses

1.0 Introduction
1.1 About this tutorial
1.2 About the Author
1.3 Opening Notes

2.0 Basic Unix File System
2.1 ETC
2.2 Everything Else

3.0 Final Notes

4.0 Files

4.1 Internet Related
4.1.1 ftpusers
4.1.2 services
4.1.3 netstart
4.1.4 networks
4.1.5 hosts.allow
4.1.6 hosts.equiv
4.1.7 hosts.lpd
4.1.8 hosts.deny
4.1.9 inetd.conf
4.2 System Related
4.2.1 resolv.conf
4.2.2 modems
4.2.3 motd
4.2.4 aliases
4.2.5 shells
4.2.6 hosts
4.2.7 auth.conf
4.2.8 newsyslog.conf
4.2.9 crontab
4.2.10 csh.login
4.2.11 csh.logout
4.2.12 syslog.conf
4.2.13 dhclient.conf
4.2.14 phones
4.2.15 fstab
4.2.16 login.conf
4.2.17 usbd.conf
4.2.18 login.access
4.2.19 dm.conf
4.2.20 ttys

4.3 User Related
4.3.1 master.passwd
4.3.2 adduser.conf
4.3.3 adduser.message
4.3.4 group
4.3.5 passwd
5.0 Closing Notes
6.0 Acknowledgments

 

1.0 Introduction

1.1 About this tutorial - This is a tutorial on the files found in the /etc directory on UNIX systems. It is based on BSD (FreeBSD 4.2 to be exact) so it might not be exactly the same as your Linux, Solaris or *BSD box. However there should be some similarities, hopefully enough that this is useful at least. NOTE* It is now 1 Am, I am on very little sleep and to much caffeine, mistakes might happen. I will what I can to catch them but I am not responsible if anything from this tutorial (or anything else) happens to damage your operating system, you, or your pet dog Fluffy.

1.2 About the Author - I ( Digital Fallout ) work an an ISP where I have the privilege to work on a variety of computers including UNIX. Some people call me a hacker, some call me weird, both terms are fine my me. I consider myself just a geek who happens to like UNIX and probably knows a bit more than yourself, that all. I am not some UNIX gift from god, I just find it interesting.

1.3 Opening Notes - Like I said earlier, I am not responsible for anything that may become from this tutorial. It is your computer, these are just my thoughts/ideas. I don't can can't grantee the accuracy of all the information in this tutorial. As errors become apparent, I will revise and re-release it to make it a more resourceful document. Again, mess with these files at your own risk, there is a reason you need to be root to mess with these files.

2.0 Basic Unix File System

2.1 ETC - The files located in the /etc directory of UNIX are mostly made up of configuration and system information files. That makes these files very important. Do not edit them unless you know what you are doing. I have had to reinstall Linux many a times because some change I made locked me out of my own system.

2.2 Everything Else - I am more than aware of the rest of the UNIX file system but there is simply to much to go over in this tutorial. Perhaps I will create other tutorials to go over these files but for now, reference your documentation, that can explain things better than I ever will be able to.


3.0 Final Notes

Following are descriptions of specific files grouped by their basic function. Some are extremely detailed wile others are barely mentioned. This if for three reasons. #1, it isn't that important of a file for what you will probably be doing. That is, you probably wont mess with it regardless of wither or not you know what it does. And #2 is that I am not knowledgeable about that file. Yes, I still have allot to learn about UNIX, I am just trying to help you out with what knowledge I do have. And Finally, #3, maybe it is just that simple :) Also, for more information about most ( if not all ) of these files, look at the man pages associated with these files. Time man <file name> or man man for more information about the man command. ( get all of that? ).


4.0 Files

4.1 Internet Related

4.1.1 ftpusers - This is a file that will list all users that are not allowed to access the FTP server. Some users/daemons are added by default such as BIND, games, and pop.

4.1.2 services - This file lists a complete ( if not near-complete ) set of services and what ports they run on. Examples are FTP, HTTP, and finger.

4.1.3 netstart - Netstart is an obsolete file ( made so by rc.network ) but is still installed in case you would like to start the network manually in case for example, you are in single user mode.

4.1.4 networks - Networks holds a database of your local networks

4.1.5 hosts.allow - Used for IP chains and TCP wrappers, this file contains the rules that would allow a computer to connect.

4.1.6 hosts.equiv - This file contains a database of trusted hosts and users that you would allow to connect to your computer.

4.1.7 hosts.lpd - This file has a list of hostnames and IP addresses that are allowed to use your print services.

4.1.8 inetd.conf -This file contains all the daemons your computer has running ( and ones that have been disables ). It is a prime target for hackers because this is the file that UNIX checks to see what it should do with a connection on a given port ( Sendmail, POP3, FTP).

4.1.8 hosts.deny -This file is used by the IP rule set to decide what hosts to block access to the computer

4.2 System Related

4.2.1 resolv.conf - This file has a list of your DNS servers used for resolving host names to IP addresses.

4.2.2 modems - This is the modem configuration database.

4.2.3 motd - See that text that scrolls by when you login? Look Familiar? It is the same text as in the motd file. By editing this file, you can change what text users see when they log onto your system.

4.2.4 aliases - This file contains all the aliases used by sendmail. The file actually exists in /etc/mail but is linked to /etc for convince.

4.2.5 shells - The shell database exists in the file. All shells installed on your system will appear in this file. Also note that any user not using one of these shells is not allowed to FTP into the server.

4.2.6 hosts - This file contains all the known hosts on the network.

4.2.7 auth.conf - This file configures the kind of authentication that UNIX should use.

4.2.8 newsyslog.conf - Configuration file for newsyslog

4.2.9 crontab - Crontab is used to schedule tasks to repeat at a given interval. Crontab has fields for minutes, hours, days, and months.

4.2.10 csh.login - This is the system wide .login file for the csh shell

4.2.11 csh.logout - As you may have guessed, this is the system wide logout file for the csh shell. ( Surprise! )

4.2.12 syslog.conf - This is the configuration file for the syslog program.

4.2.13 dhclient.conf - A required configuration file for the ISC DHCP client, an empty or completely remarked file indicates default configuration,

4.2.14 phones - This file holds the remote host number database

4.2.15 fstab - Fstab contains the system partition configuration with mount points, file type, options, and dump.

4.2.16 login.conf - This is the login class capability database

4.2.17 usbd.conf - The usbd.conf file is the configuration file for the USB daemon.

4.2.18 login.access - This is the login access control table

4.2.19 dm.conf - The configuration file for the dm program.

4.2.20 ttys - This is the terminal initialization information and is used by some routines to use special files for the terminal,.

4.3 User Related

4.3.1 master.passwd - This file looks allot like the normal passwd file except
it has the encrypted passwords in the second field

4.3.2 adduser.conf - This is the configuration file for the adduser script used
to add user accounts.

4.3.3 adduser.message - This is the message you can select to send to new
users when they first login.

4.3.4 group - This is the database containing all the groups on your system and who belongs in each group.

4.3.5 passwd - This is the user database ( minus the password ) It is a very important file and should be backed up regularly and check for compromises.


5.0 Closing Notes


I know this looks more like a reference guide than a tutorial but that is how I wanted it to be. I wanted this text to be used "on the spot" so you can pick what files you need to know about. If I decide to make further editions of this text I will include more Linux type files in addition to the BSD ones you already see here. I am sure you see a resemblance between my descriptions and the man pages for these files. Good, that means you are doing some research by yourself, you learn better that way anyways :)


6.0 Acknowledgments

Thanks to everybody who hangs out in the #BSRF chartroom ( irc.box.sk ) and The Black Sun Research Facility ( even though I help run it ) for giving me someplace to publish this work. Special thanks goes out to Mikkkeee for helping out with BSRF, Cyberwolf for the same reasons, AZTEK for helping me with all my stupid PHP questions, Kript0n for just being cool :), Matt, RedShadow, ElfQrin, Ghost Rider, and caboom for just being themselves. And finally MAJOR thanks need to go out to cube from Box Network for without him there would be no Black Sun or any other great opportunities he gives out. Thanks to you man :)

http://blacksun.box.sk

http://www.boxnetwork.net


Credits

V1.0
Written by Digital Fallout
version 1.0, 7/12/2001